Wire electric discharge machining control apparatus

ABSTRACT

An electric discharge machining control apparatus is provided capable of effecting straight machining, corner machining, and arcuate machining in a stable manner, with improved accuracy. A numerical control unit serves for straight machining under optimum electrical conditions, and controls the on-off operation of relay contacts to and the on-off duty ratio of a pulse oscillator, in order to establish the respective optimum values of a capacitor charging voltage, discharge current, and charge and discharge time read out from a memory in accordance with a calculated corner angle or a calculated radius of a circular arc, machining.

BACKGROUND OF THE INVENTION

The present invention relates to an apparatus for controlling a power source of a wire electric discharge machine, and more particularly, to an electric discharge machining control apparatus capable of effecting straight machining, corner machining, and arcuate machining in a stable manner, with improved accuracy.

Presently, many wire electric discharge machines use water as a machining fluid. In this case, a leakage current is produced between a wire electrode and a workpiece in accordance with a gap resistance therebetween, whereby electrolysis is effected. In rough machining, the leakage current does not raise any special problem because electric discharge energy is great. In finish machining, however, if the electric discharge energy for each cycle is large, the machined surface of the workpiece is too rough. In order to minimize surface roughness, therefore, the electric discharge energy must be reduced. If the electric discharge energy is too small, however, stable electric discharge cannot be maintained due to the aforesaid leakage current.

In corner machining or arcuate machining for concave portions, the gap resistance is lower, and more leakage current flows than in straight machining, resulting in too small electric discharge energy which permits unstable electric discharge. Conventionally, therefore, electrical conditions, such as current, supply voltage, on/off time for capacitor charge and discharge in a capacitor discharge circuit, etc., are adjusted during corner machining such that the gap resistance is low, and the leakage current is substantial.

If straight machining is performed under electrical conditions such that stable electric discharge can be obtained and the roughness of the machined surface is satisfactory in the corner machining process for concave portions, the electric discharge energy increases due to less leakage current than in the corner machining, so that the machined surface roughness worsens.

SUMMARY OF THE INVENTION

Accordingly, the object of the present invention is to provide an electric discharge machining control apparatus permitting stable electric discharge in both a straight machining process and a corner or arcuate machining process in finish machining, and ensuring a satisfactory, uniform surface roughness.

In order to achieve the above objects, an electric discharge machining control apparatus according to the present invention includes first memory means for storing electrical conditions responsive to a corner angle; second memory means for storing electrical conditions responsive to the radius of a circular arc; corner angle calculating means for calculating the corner angle at the boundary between adjacent blocks of a numerical control (NC) machining program; radius calculating means for calculating the circular arc radius in response to a circular arc command from the NC machining program; corner machining discrimination means for determining whether corner machining is being performed; and control means operable in response to the result of the determination on the corner machining and the circular arc command, the control means being adapted to change electrical conditions for straight machining over to the electrical conditions read out from the first memory means, in accordance with the calculated corner angle, at the time of the corner machining, and to change the electrical conditions for the straight machining over to the electrical conditions read out from the second memory means, in accordance with the calculated circular arc radius, when the circular arc command is delivered.

According to the present invention, as described above, the straight machining can be performed under optimum electrical conditions, and the optimum electrical conditions for the corner machining can be automatically set in accordance with the corner angle. In both the straight machining and the corner machining, therefore, the electric discharge can be stabilized, the roughness of the machined surface can be minimized, and both straight and corner portions can enjoy uniform surface roughness. Also in the case of arcuate machining, the electrical conditions can be automatically optimized according to the machining circular arc radius. Even in the arcuate machining, therefore, stable electric discharge can be effected, and the machining can be accomplished with satisfactory surface roughness.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram schematically showing a wire discharge machining control apparatus according to one embodiment of the present invention, along with a capacitor discharge circuit with transistors used therewith;

FIG. 2 is a diagram illustrating corner machining;

FIG. 3 is a diagram illustrating a command for a straight line;

FIG. 4 is a diagram illustrating a command for a clockwise circular arc;

FIG. 5 is a diagram illustrating a command for a counterclockwise circular arc;

FIG. 6 is a diagram illustrating the calculation of a corner angle at the boundary between a straight-machined portion and an arcuate-machined portion;

FIG. 7 is a diagram illustrating the calculation of a corner angle at the boundary between arcuate-machined portions; and

FIG. 8 is an operational flow chart according to the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In FIG. 1, reference numerals 1, 2 and 3 denote a wire electrode, a workpiece, and a capacitor for applying electric discharge voltage therebetween, respectively. A charging circuit section of a capacitor discharge circuit, which is composed mainly of an AC power source 5, transformer 7, a rectifier circuit 6, and a first switching transistor T1, serves to variably control the voltage applied to the capacitor 3 by closing any of relay contacts Ra1 to Ra4 arranged between the elements 6 and 7. Numeral 4 denotes a smoothing capacitor. Meanwhile, an electric discharge circuit section of the capacitor discharge circuit comprises a second switching transistor T2, a diode D, and a resistor R1. Series circuits of resistors Ri (i=2 to 5) and relay contacts Rbj (j=1 to 4) are connected in parallel with the resistor R1, whereby the discharge current limiting resistance value is variably controlled by opening or closing the relay contacts Rb1 to Rb4.

The first and second transistors T1 and T2 are composed of a pnp transistor and an npn transistor, respectively. The respective bases of the transistors T1 and T2 are connected to a pulse oscillator 9 (mentioned later) so that when one of the transistors is on, the other is off.

Numeral 10 denotes a numerical control unit for controlling the electric discharge machining power source with the aforementioned construction and an electric discharge machine (not shown) provided with this power source. The numerical control unit 10 comprises a central processing unit (hereinafter referred to as CPU) 11, a ROM 12 for storing a control program, a RAM 13 utilized for tentative storage of data and the like, and a nonvolatile memory 14 for storing a look-up table related to electrical conditions mentioned later, and various parameters and set values. The numerical control unit 10 further comprises a manual data input device 15, a servo-interface 16, and an input/output circuit 18. The elements 12 to 18 are connected to the CPU 11 by means of a bus 19. The servo-interface 16 is connected with servo-circuits (one of which is denoted by numeral 17) for individually driving servomotors (one of which is designated by symbol M) for various axes of the electric discharge machine.

The input/output circuit 18 is connected with a pulse oscillator 9 used to turn on and off the first and second transistors T1 and T2. The on-off duty ratio of pulses generated from the pulse oscillator 9 is controlled by the CPU 11 through the medium of the circuit 18. Also, a ferroelectric circuit 8 is connected to the input/output circuit 18, and individual relays in the ferroelectric circuit 8 are controlled by means of the CPU 11 so that their contacts Ra1 to Ra4 and Rb1 to Rb4 are turned on and off. Thus, the voltage applied to the rectifier circuit 6 and the current limiting resistance value are controlled to control the discharge current.

First, the operation of the capacitor discharge circuit will be described.

If one of the relay contacts Ra1 to Ra4 is turned on, a DC voltage corresponding to the closed relay contact is generated from the output terminal of the rectifier circuit 6. When the first transistor T1 is on, a closed circuit is formed including the positive terminal of the rectifier circuit 6, the first transistor T1, the resistor R1, the capacitor 3, the workpiece 2, the wire electrode 1, and the negative terminal of the rectifier circuit 6. Thus, the capacitor 3 is charged. Subsequently, when the first and second transistors T1 and T2 are turned off and on, respectively, the charging voltage of the capacitor 3 is applied to the gap between the wire electrode 1 and the workpiece 2 via the resistor R1 or other current limiting resistor, the second transistor T2, and the diode D, whereby electric discharge is caused.

Electric discharge machining is accomplished by repeating this operation. The charge and discharge time of the capacitor 3 can be varied by changing the on-off duty ratio of the output pulses of the pulse oscillator 9. Also, the DC voltage delivered from the rectifier circuit 6 and hence, the charging voltage of the capacitor 3, can be varied by selecting the closed relay contact among the relays Ra1 to Ra4 by the ferroelectric circuit 8. By selecting the closed contact among the relay contacts Rb1 to Rb4, moreover, the current limiting resistance value can be varied to control the discharge current. Thus, the electric discharge energy can be controlled by controlling the charge and discharge time, DC current, and discharge current.

In order to effect this control, the on-off duty ratio, DC voltage, and discharge current, which are available for the establishment of optimum electrical conditions for the corner machining and arcuate machining, are previously stored in the nonvolatile memory 14. More specifically, that one of the relay contacts Ra1 to Ra4 and Rb1 to Rb4 is to be turned on, the duty ratio of the pulse oscillator 9 is individually stored in advance in a Table TA in non-volatile memory 14 for use as first memory means, according to the corner angle. Also, the relay contact to be turned on and the duty ratio are individually stored beforehand in a Table TB in non-volatile memory 14 as second memory means, according to the radius of the circular arc.

Tables TA and TB may be prepared on the basis of these optimum electrical conditions which are obtained empirically. Alternatively, however, the gap resistance may be obtained mathematically so that the individual electrical conditions are determined in accordance with the gap resistance.

Usually, the gap resistance Rg used in the straight finish machining is given by the following equation (1):

    Rg≈ρ·(1/2πl)·log {(2h-a)/a}(1)

where ρ is the specific resistance of a machining fluid, l is the thickness of the workpiece, h is an offset amount, and a is the radius of the wire electrode.

If the gap resistance used in the machining of a concave portion with a corner angle θ is Rg', as shown in FIG. 2, the conductance obtained in this case is given by equation (2) as follows:

    1/Rg'≈1/[ρ·(1/2πl)·log {(2h-a)/a}]+1/[ρ·{(h-a)/aθl}]          (2)

Multiplying equation (1) by equation (2), we obtain ##EQU1## Here if we have (h-a)=δ<a, there is a relation:

    log {(2h-a)/a}=log {(a+2δ)/a}≈2δ/a     (4)

Substituting for equation (3) from equation (4), we obtain ##EQU2##

In the concave corner machining, as compared with the straight machining, the gap resistance is reduced as the corner angle θ increases, as seen from equation (5), so that the leakage current also varies.

A gap value δ (=h-a), which is obtained by subtracting the radius a of the wire electrode 1 from the offset amount h, ranges from about 0.005 to 0.010 mm in regular finish machining, and cannot be easily forecast in advance. However, the approximate value of Rg/Rg', which is determined definitely according to the corner angle, is not subject to the influence of the variation of the gap δ, as seen from equation (5), so that the change of the gap resistance for the corner machining can be estimated. Thus, the electrical conditions can be changed so as to compensate the gap resistance by previously setting working conditions for the straight machining, and then determining, on the basis of equation (5), the degree of variation of the gap resistance caused when the machining process is changed from straight machining to corner machining.

In controlling the discharge current, for example, the voltage applied to the gap between the wire electrode 1 and the workpiece 2 for the straight machining process is V₀ ·{Rg/(r₀ +Rg)}, if the initial current limiting resistance value and the charging voltage of the capacitor 3 are r₀ and V₀, respectively. If the gap resistance becomes Rg' at the time of corner machining, however, the voltage applied to the gap becomes V₀ ·{Rg'/(r₀ +Rg')}. Thereupon, a current limiting resistance value r₁ to make the gap voltage constant is given by

    V.sub.0 ·{Rg/(r.sub.0 +Rg)}=V.sub.0 ·{Rg'/(r.sub.1 +Rg')}(6)

Transforming equation (6), we obtain

    r.sub.1 +Rg'=(Rg'/Rg)·(r.sub.0 +Rg)

and therefore, ##EQU3##

As seen from equation (7), the gap voltage can be made constant by setting the resistance value r₁ so that the ratios r₁ /r₀ and Rg'/Rg are equal. According to the present embodiment in which only the four resistors R2 to R5 can be turned on and off, however, the value r₁ actually cannot be varied finely, so that it is set to a relatively small value. More specifically, there is a relation:

    r.sub.1 /r.sub.0 ≦Rg'/Rg                            (8)

Substituting for equation (8) from equation (5), we obtain ##EQU4##

Thus, the required current limiting resistance value r₁ for the corner machining process is given by a function of the corner angle θ. In order to obtain a fixed gap voltage by variably controlling the resistance value r₁ therefore, it is necessary only that the relay contact to be turned on be stored in Table TA according to the corner angle θ, as mentioned before.

In order to make the gap voltage constant by controlling the DC supply voltage, i.e., the charging voltage of the capacitor 3, moreover, it is necessary only that the capacitor charging voltage for the corner machining process be controlled so that the following equation holds:

    V.sub.0 ·{Rg/(r.sub.0 +Rg)}=V.sub.1 ·{Rg'/(r.sub.0 +Rg')}

where V₀ and V₁ are capacitor charging voltages for the straight and corner machining processes, respectively.

Accordingly, we obtain: ##EQU5##

In this case, it is necessary to empirically obtain the value of the ratio r₀ /Rg for the straight machining in advance. Usually, the value r₀ /Rg is about 1/2 or less.

Substituting for equation (10) from equation (5), we can obtain the required capacitor charging voltage V₁ for the corner machining in accordance with the corner angle θ. The gap resistance for the corner machining of convex portions may be obtained mathematically. In this case, however, the optimum electrical conditions should preferably be determined empirically according to the corner angle θ.

Further, a required duty ratio corresponding to the corner angle θ is obtained mathematically and empirically, and stored in Table TA in advance. A detailed description of these processes is omitted herein.

Also for the arcuate machining, optimum electrical conditions corresponding to the radius of the circular arc are obtained empirically and stored in Table TB in advance.

The following is a description of a method for obtaining the corner angle θ.

A command data of the numerical control unit basically serves as an instruction for the execution of the straight machining or arcuate machining. In the case of a command for a straight line shown in FIG. 3, a stroke ΔX (Δx, Δy), which starts at the terminal point of a starting vector X (x₀, y₀), is given by means of a code G₀₁. In the case of a command for a clockwise circular arc shown in FIG. 4, a stroke ΔX (Δx, Δy) and an arc center position R (I, J), which starts at the terminal point of a starting vector X₀ (x₀, y₀) and terminates at the center of a circular arc starting at the terminal point of the vector X₀, are given by means of a code G₀₂. In the case of a command for a counterclockwise circular arc shown in FIG. 5, moreover, an arc center position R (I, J) and a stroke ΔX (Δx, Δy) for the starting vector X₀ (x₀, y₀) are given by means of a code G₀₃.

Accordingly, unit vectors U₁ and U₂ directed perpendicularly to the right from the starting and terminal points of the straight line, with respect to the advancing direction, are given by equation (11) as follows: ##EQU6##

Unit vectors U₁ and U₂ directed perpendicularly to the right from the starting and terminal points of the clockwise circular arc, with respect to the advancing direction, are given by equations (12) and (13), respectively, as follows: ##EQU7##

Unit vectors U₁ and U₂ directed perpendicularly to the right from the starting and terminal points of the counterclockwise circular arc, with respect to the advancing direction, are given by equations (14) and (15) as follows: ##EQU8##

Thus, if a machining curve for a corner portion is formed of a straight line and a counterclockwise circular arc, as shown in FIG. 6, for example, a unit vector U₂ at the terminal point of the straight line is obtained according to equation (11), a unit vector U₁ at the starting point of the counterclockwise circular arc is obtained according to equation (14), and the outer product (U₁ ×U₂) of these two vectors is calculated. Thereupon, the value of the outer product corresponds to the corner angle, and its sign indicates whether the corner portion is concave or convex. In the concave corner portion machining shown in FIG. 6, for example, the outer product (U₁ ×U₂) is positive. For a convex corner portion, on the other hand, the outer product is negative. If the corner portion is composed of a counterclockwise circular arc and a clockwise circular arc, as shown in FIG. 7, a unit vector U₂ at the terminal point of the counterclockwise circular arc is obtained according to equation (15), a unit vector U₁ at the starting point of the clockwise circular arc is obtained according to equation (12), and the outer product of these two vectors is calculated. Thereupon, the value of the outer product corresponds to the corner angle, and its sign indicates whether the corner portion is concave or convex.

Referring now to the flow chart of FIG. 8, the operation of the apparatus according to the present embodiment will be described.

A finish machining mode is established, the electrical conditions (voltage, current, and on/off time) are set to their respective optimum values for the straight machining, and the machining work is started. The CPU 11 reads out one block of an NC machining program stored in the nonvolatile memory 14, and stores it in an execution buffer BAR provided in the RAM 13 (Step S1). Then, the CPU 11 reads out the next block and stores it in a buffer CAR (Step S2), and executes the block stored in the buffer BAR Step S3. Thereafter, the CPU 11 distributes pulses to the individual servo-circuits 17 through the servo-interface 16, thereby driving the individual servomotors. When the machining work is started, the CPU 11 determines whether the command from the block concerned is a straight line command (G₀₁) or a circular arc command (G₀₂, G₀₃) (Step S4). If the command is the straight line command (G₀₁), the program proceeds to Step S7. If the command is the circular arc command, on the other hand, radius calculation is performed (Step S5) on the basis of the arc center position R(I, J) which corresponds to the starting vector X(x₀, y₀). Then, the electrical conditions (voltage, current, and on/off time) corresponding to the obtained radius are obtained from Table TB of the nonvolatile memory 14. Subsequently, control outputs corresponding to the electrical conditions are delivered from the input/output circuit 18, so that the individual relays of the ferroelectric circuit 8 are activated, the relay contacts Ra1 to Ra4 and Rb1 to Rb4 are switched, and the duty ratio of the pulse oscillator 9 is changed. Thus, the electrical conditions are changed for the optimum ones for the arcuate machining with the aforesaid radius (Step S6), whereupon the program proceeds to Step S7.

In Step S7, a residual stroke Lr associated with the command from the block concerned is read out from a register for storing the residual stroke Lr, and whether the residual stroke Lr is smaller than a set value α, that is, whether corner machining within a region α near the boundary between blocks is started, is determined. If the execution of the corner machining is detected, the unit vector U₂ at the terminal point of the present block stored in the buffer BAR and the unit vector U₁ at the starting point of the next block (CAR) are obtained on the basis of the command from the present block (BAR) and a command from the buffer CAR for storing the next block, and in accordance with their corresponding ones of equations (12) to (16). Further, the outer product of these unit vectors U₁ and U₂ is calculated, whether the corner is concave or convex is determined by the sign of the outer product, and the corner angle θ is obtained in accordance with the absolute value of the outer product (Step S8). The electrical conditions corresponding to the corner angle θ thus obtained are read out from Table TA, the relay contacts Ra1 to Ra4 and Rb1 to Rb4 are switched in accordance with the corner angle θ, and the duty ratio of the pulse generator 9 is changed. Thus, the conditions are changed for the required voltage, current, and on/off time (Step S9). Then, whether the present block is finished is determined (Step S10). If the end of the present block is detected, the next block stored in the buffer CAR is transferred to the buffer BAR (Step S11). Unless the command from the block stored in the buffer BAR is a command for the end of the program (Step S12), the next block is inputted anew for the buffer CAR in accordance with the NC program (Step S13).

Subsequently, the block stored in the buffer BAR starts to be executed (Step S14), and the residual stroke Lr is subtracted from a stroke ##EQU9## specified in the present block. When the differences between these strokes exceeds the set value α (Step S15), the electrical conditions are restored to the electrical conditions for the straight machining (Step S16). More specifically, when the region α near the boundary between the blocks is passed, the electrical conditions are restored from the conditions for the corner machining to the conditions for the straight machining.

Then, the program proceeds again to Step S4. If the currently executed block is for the arcuate machining, the machining is executed after the electrical conditions are changed corresponding to the radius of the circular arc, as mentioned before (Steps S5 and S6). When the residual stroke Lr enters the region α near the boundary between the blocks (Step S7), the corner angle θ at the boundary region is calculated, and the electrical conditions are changed in accordance with the corner angle (Steps S8 and S9).

Thereafter, the processes of Step S10 and the subsequent steps are executed in the aforementioned manner. Thus, the processes of Steps S4 to S16 are repeated successively until the program ends. When a program end code is stored in the buffer BAR, the processes are finished (Step S12). 

I claim:
 1. A wire electric discharge machining control apparatus, comprising:first memory means for storing electrical conditions responsive to a corner angle; second memory means for storing electrical conditions responsive to the radius of a circular arc; means for calculating the corner angle at a boundary between adjacent blocks of an NC machining program; means for calculating the circular arc radius in response to a circular arc command delivered from the NC machining program; corner machining discrimination means for determining whether corner machining is being performed; and control means, operable in response to the result of the determination on the corner machining and said circular arc command, for changing electrical conditions for straight machining over to the electrical conditions read out from said first memory means, in accordance with said calculated corner angle, at the time of the corner machining, and for changing the electrical conditions for the straight machining over to the electrical conditions read out from said second memory means, in accordance with said calculated circular arc radius, when said circular arc command is delivered.
 2. A wire electric discharge machining control apparatus according to claim 1, further comprising a capacitor charged and discharged for machining, wherein said stored electrical conditions include any of the charging voltage, discharge current, and charge and discharge time of said capacitor.
 3. A wire electric discharge machining control apparatus according to claim 1, wherein said control means is operable in response to a finish machining command, to change said electrical conditions only at the time of finish machining.
 4. A wire electric discharge machining control apparatus according to claim 2, wherein said control means is operable in response to a finish machining command, to change said electrical conditions only at the time of finish machining. 